MCU_256L Lighting Controller communication driver

 

MCU_256L Lighting Controller communication driver is the driver to communicate with lighting controller of SmartOn Technology in Korea.

 

1. Read Settings

 

<Figure 1> is read setting example of MCU_256L Lighting Controller communication driver.

<Figure 1>  Read setting example of MCU_256L Lighting Controller communication driver

Device part of  <Figure 1> input Com Port(COM1), Baud Rate(4800), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively according to setting of controller.

Baud rate of MCU_256L Lighting Controller can set from 2400 to 9600 bps.

 

MCU_256L Lighting Controller communication driver communication driver read schedule

Read schedule setting parameters are as follows:

1) Station – 0 ~ 63 station number.

2) Read command – command = DATA, SWITCH, G_SW, G_DATA, TIME, SCH. ( refer to <Table 1> )

3) Read start address – don't care.

4) Save start address for Communication Server – Saving start address of Communication Server.

5) Read Size – fixed to 1.

 

Read schedule example)

READ,     0,  DATA,     0,    0,   1,

READ,     0,  TIME,     0,   10,   1,

 

<Table 1> is read command and contents of MCU_256L Lighting Controller communication driver. 

Read command Contents

Data saving address

DATA read of Data Scan

Start addr +  0 ~ 3 : Relay data value(16bit x 4 = 64 Relay)

Start addr +  4 : Group data value(0 ~ B bit = 12 Group)

Start addr +  5 : Pattern data value(0 ~ 7 bit = 8 Pattern)

Start addr +  6 : jode data value

SWITCH read of Switch Setting
Data

Start addr +  0 ~ 15 : Switch Setting data value

16bit x 16 = 256°³ Switch Setting data value

G_SW read of Group Switch
Setting Data

Start addr +  0 ~ 15 : Group Switch Setting data value

16bit x 16 = 256°³ Group Switch Setting data value

G_DATA read of Group Setting Data

Start addr +  0 ~ 47 : Group Data Setting data value

16bit x 48 = 768°³ Group Data Setting data value

TIME read of current time

Start addr +  0 ~ 4 : second, minute, hour, day, month

Start addr +  5 : day of the week(0~6, 0 = sunday, 1 = monday..)

Start addr +  6 : year % 100

SCH read of Schedule
Setting Data

Start addr +  0 ~ 47 : Group Data Setting data value

16bit x 48 = 768°³ Group Data Setting data value

<Table 1> Read command and contents of MCU_256L Lighting Controller communication driver

MCU_256L Lighting Controller communication driver store the same data in WORD, DWORD, FLOAT memory, but the data format are different.

If you click the icon  in protocol option part at <Figure 1>, you can see the dialogue box such as <Figure 2>. you can also set read schedule by using this part. 

<Figure 2> Example of MCU_256L Lighting Controller communication driver¡¯s Option dialog box

You can set read schedule by using , , button and listbox of <Figure 2>.

<Figure 3> Example of MCU_256L Lighting Controller communication driver¡¯s read schedule Add/Edit dialog box

When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.

 

2. Writing settings

You can control MCU_256L Lighting Controller controller by using 'writing settings'. 

 

Digital Write

Digital write and analog write have the same setting parameters except output value. 

 

Analog Write 

Analog write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             0 ~ 63 station number.

3)  ADDRESS          writing address. ( refer to <Table 2> )

4)  Extra1                  command = DATA, SWITCH, G_SW, G_DATA, TIME, SCH read command or

RELAY, GROUP, A_GROUP, G_SET, S_SET, G_SW, SCH_SET, S_TIME, CLEAR write command. ( refer to <Table 2> )

5) Extra2                   data saving address or file number.

DATA, SWITCH, G_SW, G_DATA, TIME, SCH command : readed data saving start address,

G_SET, S_SET, G_SW, SCH_SET command : file number of setting value (0 ~ 999),

other command : don't care.

 

Block write

MCU_256L Lighting Controller communication driver don't support 'Block write'.

 

<Table 2> is write command and elements of MCU_256L Lighting Controller communication driver.

<Table 3> is data input method for G_SET , S_SET , G_SW , SCH_SET write command.

Write command Contents Address range

Output value

RELAY control of indivisual Relay 0000 ~ 003F (hex-decimal)

1 = ON, 0 = OFF

GROUP Group control 0000 ~ 000C (hex-decimal)
A_GROUP All Group control 0000 ~ 000C (hex-decimal)
G_SET Group Setting don't care

read setting data 1st line from work foladr\SCAN\SET_DATA_%03d.ini (%03d = Extra2) file 

data input method = refer to <Table 3>

S_SET Switch Setting
G_SW Group Switch Setting
SCH_SET Schedule Setting
S_TIME time syncronization with computer

don't care

CLEAR setting memory Clear

0 = Group Buffer Clear, 1 = Pattern Buffer Clear,

2 = Switch Buffer Clear, 3 = Group/Pattern Switch Buffer Clear,

4 = Schedule Buffer Clear, 5 = All Memory Clear.

<Table 2> Write command and elements of MCU_256L Lighting Controller communication driver

file name of setting data

Input method

work folder\SCAN\SET_DATA_%03d.ini

(%03d = Extra2)

1. input all data at 1st line

2. separate each data by comma( , )

3. input hex-decimal unit data(00 ~ FF)

4. max input data = 200

<Table 3> Data input method for G_SET , S_SET , G_SW , SCH_SET write command

Write example 1)

PORT:0,  station:0, ADDRESS:0000, Extra1: RELAY,  Extra2 : 0

The setting parameter shown above is indivisual relay control(On/Off) example for number 0 relay.

 

Write example 2)

PORT:0,  station:0, ADDRESS:0000, Extra1: G_SET,  Extra2 : 1

The setting parameter shown above is 'Group setting' example,. The setting data file = 1st line of ¡®work folader\SCAN\SET_DATA_001.ini¡¯ file.

 

3. Appearance of MCU_256L Lighting Controller

<Figure 4> is appearance of  MCU_256L Lighting Controller.

1.png
<Figure 4> Appearance of  MCU_256L Lighting Controller